﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace AesonBaseFramework.EntityFramework.Repositories.Interfaces
{
    public interface IBaseAsyncRepository<T> where T : class
    {
        T Add(T toBeAdded);
        Task<int> CountAsync();
        Task<ICollection<T>> GetAllAsync();
        Task<ICollection<T>> GetAllAsyncWhere(Expression<Func<T, bool>> match);
        Task<T> GetByIdAsync(int id);
        Task<T> GetSingleAsync(Expression<Func<T, bool>> match);
        T Remove(T toBeRemoved);
        Task<T> UpdateAsync(T updated, int key);
    }
}
